<div class="p-20">
    <!-- 整改项目  begin -->
    <p-panel headerClass="bg-none" contentClass="p-0" styleClass="radius-none">
        <p-header>
            <div class="text-right p-6-0">
                <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8 m-b-10">
                  {{modifyRecord.modifyRecord}}
                  <span class="panel-status-success">{{modifyRecord.statusText}}</span>
                </span>
                <button pButton type="button" (click)="openWindow();" label="重新整改" class="btn-secondary"></button>
                <button pButton type="button" (click)="punishments();" label="发起处罚" class="btn-secondary"></button>
            </div>
        </p-header>
        <div class="p-20 border-b-d9d9d9">
            <form #form="ngForm" novalidate class="form-horizontal" role="form">
                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">项目名称：</div>
                    <div class="table-cell">
                        {{modifyRecord.modifyRecord}}&nbsp;{{modifyRecord.code}}
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">最后期限：</div>
                    <div class="table-cell">
                        {{modifyRecord.deadline}}
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">整改人：</div>
                    <div class="table-cell">
                        {{modifyRecord.creater}}&nbsp;{{storage.dicFilter('user_type',modifyRecord.userType)}}
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">客户是否可见：</div>
                    <div class="table-cell">
                        {{modifyRecord.isCustomScanText}}
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right p-l-25 width-150 color-b1b1b1">是否已延期：</div>
                    <div class="table-cell">
                        {{modifyRecord.isDelayText}}
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right p-l-25 width-150 color-b1b1b1">延期天数：</div>
                    <div class="table-cell">
                        {{modifyRecord.isDelay && modifyRecord.delayDays ? modifyRecord.delayDays + '天' : ''}}
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right p-l-25 width-150 color-b1b1b1" style="vertical-align:top">不合格图片：</div>
                    <div class="table-cell">
                        <div class="pull-left load-img" *ngIf="recordPhotoesImages && recordPhotoesImages.length>0">
                            <p-lightboxfile styleClass="inline-block" [images]="recordPhotoesImages" [showDelete]="false"></p-lightboxfile>
                        </div>
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">说明：</div>
                    <div class="table-cell">
                        {{modifyRecord.description}}
                    </div>
                </div>
            </form>
        </div>
    </p-panel>
    <!-- 整改项目  begin -->

    <!--整改提报内容  begin -->
    <p-panel headerClass="bg-none " contentClass="p-0" styleClass="m-t-20 radius-none">
        <p-header>
            <div class="text-right p-6-0 " style="height: 48px;">
                <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">
                    整改提报内容
                </span>
            </div>
        </p-header>
        <div class="p-20 border-b-d9d9d9">
            <form #form="ngForm" novalidate class="form-horizontal" role="form">

                <div class="table-row">
                    <div class="table-cell width-150 text-right p-l-25 color-b1b1b1" style="vertical-align:top">拍摄照片：</div>
                    <div class="table-cell">
                        <div class="pull-left load-img" *ngIf="reportPhotoesImages && reportPhotoesImages.length>0">
                            <p-lightboxfile styleClass="inline-block" [images]="reportPhotoesImages" [showDelete]="false"></p-lightboxfile>
                        </div>
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">说明：</div>
                    <div class="table-cell">
                        {{modifyRecord.reportDescription}}
                    </div>
                </div>
            </form>
        </div>
    </p-panel>
    <!-- 整改提报内容  begin -->

    <!--审核结果  begin -->
    <p-panel headerClass="bg-none " contentClass="p-0" styleClass="m-t-20 radius-none">
        <p-header>
            <div class="text-right p-6-0" style="height: 48px;">
                <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">
                    审核结果 （注：只获取最新的一条，若无数据，不显示）
                </span>
            </div>
        </p-header>
        <div class="p-20 border-b-d9d9d9">
            <form #form="ngForm" novalidate class="form-horizontal" role="form">

                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">审核结果：</div>
                    <div class="table-cell">
                        {{storage.dicFilter('approveResult',approves.approveResult)}}
                    </div>
                </div>

                <div class="table-row" *ngIf="approves.approveResult == 'approveresult_noapprove'">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1" style="vertical-align:top">不合格情况：</div>
                    <div class="table-cell">
                        <div class="pull-left load-img" *ngIf="approvePhotoesImages && approvePhotoesImages.length>0">
                            <p-lightboxfile styleClass="inline-block" [images]="approvePhotoesImages" [showDelete]="false"></p-lightboxfile>
                        </div>
                    </div>
                </div>

                <div class="table-row">
                    <div class="table-cell text-right width-150 p-l-25 color-b1b1b1">说明：</div>
                    <div class="table-cell">
                        {{approves.description}}
                    </div>
                </div>
            </form>
        </div>
    </p-panel>
    <!-- 审核结果  begin -->

    <!-- 操作记录 begin-->
    <p-panel headerClass="bg-none " contentClass="p-0" styleClass="m-t-20 radius-none">
        <p-header>
            <div class="text-right p-6-0" style="height: 48px;">
                <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">
                    操作人记录
                </span>
            </div>
        </p-header>
        <div class="p-20 border-b-d9d9d9">
            <p-dataTable [value]="operations" [showTableHeader]="true">
                <p-column *ngFor="let col of operationsCol" [field]='col.field' [header]='col.header' [hidden]="col.hidden" [style]="{'width':col.width}">
                    <ng-template let-index="rowIndex" let-data="rowData" pTemplate="body" *ngIf="col.dic">
                        <span *ngIf="col.field == 'afterSubmitStatus'"> {{storage.dicFilter(col.dic,data[col.field])}} </span>
                        <span *ngIf="col.field == 'creater'">
                          {{data[col.field]}} &nbsp; {{storage.dicFilter(col.dic,data['userType'])}}
                        </span>
                    </ng-template>
                    <ng-template let-index="rowIndex" let-data="rowData" pTemplate="body" *ngIf="col.tem">
                        <span *ngIf="col.field == 'sortNum'"> {{index + 1}} </span>
                    </ng-template>
                </p-column>
            </p-dataTable>
        </div>
    </p-panel>
    <!-- 操作记录 end-->


    <!-- 表单 begin-->
    <p-dialog [header]="'整改驳回'" [(visible)]="isShow" modal="modal" width="700" [responsive]="true">
        <div class="text-center  wrap-content">
            <div class="inline-block">
                <form #form="ngForm" (ngSubmit)="form.form.valid" novalidate class="form-horizontal 'disabled-readonly" role="form" >
                    <div class="table-row">
                        <div class="table-cell text-right p-l-25 p-required width-128" style="vertical-align:top">
                            不合格照片：
                        </div>
                        <div class="table-cell text-left" style="width:390px">
                            <div class="pull-left load-img" *ngIf="recordPhotoes2Images && recordPhotoes2Images.length>0">
                                <p-lightboxfile (removeItem)="removeItem($event,'recordPhotoes2');changeImges()" styleClass="inline-block" [images]="recordPhotoes2Images"
                                    [showDelete]="true"></p-lightboxfile>
                            </div>
                            <div class="ui-g-12 ui-g-nopad">
                                <a (click)="recoverModifyImage();changeImges()" style="color:#1a91eb;text-decoration:underline !important;cursor: pointer;">恢复图片</a>
                            </div>

                        </div>
                    </div>
                    <p-message *ngIf="recordPhotoes2Error" styleClass='error-meaage' severity="error" [text]="recordPhotoes2Error"></p-message>

                    <div></div>
                    <div class="table-row">
                        <div class="table-cell text-right p-l-25 p-required width-128 v-top">说明：</div>
                        <div class="table-cell text-left relative">

                            <textarea rows="5" name='refuseDescription' required (focus)="refuseDescriptionError = ''" (blur)="refuseDescriptionError = !formObj.refuseDescription ? '请输入驳回说明' : ''"
                                cols="30" maxlength="50" #refuseDescription="ngModel" [(ngModel)]="formObj.refuseDescription"
                                pInputTextarea placeholder="请输入说明" [ngStyle]="{'width': '220px' }" [ngClass]="refuseDescriptionError?'p-input-error':'p-input-error-none'"></textarea>
                            <p-message *ngIf="refuseDescriptionError" styleClass="p-centerText" [severity]="'error'" [text]="refuseDescriptionError"></p-message>
                            <div class="text-right opacity06">还可输入{{50 - (formObj.refuseDescription?.length || 0)}}个字</div>

                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-l-25 width-128"></div>
                        <div class="table-cell text-left relative">
                            <button pButton type="button" (click)="modifyReject()" [label]="'提交'" class="btn btn-success m-btn-dialog"></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </p-dialog>
    <!-- 表单 end-->
</div>

<!-- 处罚弹窗组件 -->
<app-list-punish-dialog *ngIf="isPunishShow" [data]="punishmentsData" [isShow]="isPunishShow" (changeIsShow)="changePunishShow($event)"></app-list-punish-dialog>
<!-- 处罚弹窗组件end -->
